<!--{template user/header}-->
<div style="height:30px;">&nbsp;</div>
<form method="post" autocomplete="off" name="delform" id="delform" action="{u user/collect}">
<table class="list-table" border="0" cellpadding="0" cellspacing="0">
	<thead>
		<tr>
			<th colspan="4" class="lt-th" style="position:relative;">
				<strong>收藏列表</strong>
				<select id="listOrder" name="order" style="position:absolute;right:90px;top:2px;">
					<option value="default">排序方式</option>
					<option value="end_time" {if $order == 'end_time'}selected{/if}>截止时间</option>
					<option value="bought" {if $order == 'bought'}selected{/if}>已买人数</option>
					<option value="price" {if $order == 'price'}selected{/if}>价格</option>
					<option value="discount" {if $order == 'discount'}selected{/if}>折扣</option>
				</select>
				<select id="listType" name="type" style="position:absolute;right:1px;top:2px;">
					<option value="all">全部</option>
					<option value="unexpired" {if $type == 'unexpired'}selected{/if}>抢购中</option>
					<option value="expired" {if $type == 'expired'}selected{/if}>抢购结束</option>
				</select>
			</th>
		</tr>
	</thead>
	<tbody>
		<tr class="lt-title">
			<th class="first" width="20"><input type="checkbox" id="checkall" rel="ids" /></th>
			<th width="100">图片</th>
			<th>名称</th>
			<th width="100" class="last">价格</th>
		</tr>
		<!--{loop $list $goods}-->
		<tr>
			<td class="lt-td first">
				<input type="checkbox" name="ids[]" value="$goods[id]" rel="ids" />
			</td>
			<td class="lt-td">
				<a href="$goods[url]" target="_blank"><img alt="$goods[goods_name]" src='$goods[small_img]' width="100"/></a>
			</td>
			<td class="lt-td tl">
				<a href="$goods[site_url]" target="_blank" style="color:#ff1111;">【$goods[site_name]】</a>
				<a href="$goods[url]" target="_blank" title="$goods[goods_name]">$goods[goods_name]</a><br/>
				<span>结束时间：$goods[end_time_format]</span>
				<!--{if $goods['is_end'] == 0}-->
				<span style="color:#f00;">(抢购中)</span>
				<!--{else}-->
				<span>(抢购结束)</span>
				<!--{/if}-->
			</td>
			<td class="lt-td last">
				<p>现价：<span>$goods[shop_price_format]</span></p>
				<p>原价：<span>$goods[market_price_format]</span></p>
				<p>折扣：<span>$goods[discount]</span>折</p>
				<p>已买：<span>$goods[bought]</span></p>
			</td>
		</tr>
		<!--{/loop}-->
	</tbody>
	<!--{if $pager['page_count'] > 0}-->
	<tfoot>
		<tr>
			<td colspan="4" class="pages">
				<div class="fl">
					<input type="hidden" name="page" value="$pager['page']" />
					<input type="hidden" name="delete" value="1" />
					<input type="hidden" name="action" value="collect" />
					<button type="submit"><em>删除选中的收藏</em></button>
				</div>
				<!--{subtemplate user/pages}-->
			</td>
		</tr>
	</tfoot>
	<!--{/if}-->
</table>
</form>
<script type="text/javascript">
var order = "{$order}";
var type = "{$type}";
var url = "user.php?action=collect&order=#order#&type=#type#";

jQuery(function($){
	$("#listOrder").change(function(){
		order = this.value;
		type = $("#listType").val();
		var fun = function(){
			location.href= url.replace("#order#",order).replace("#type#",type);
		}
		setTimeout(fun,1);
	});
	
	$("#listType").change(function(){
		type = this.value;
		order = $("#listOrder").val();
		
		var fun = function(){
			location.href= url.replace("#order#",order).replace("#type#",type);
		}
		setTimeout(fun,1);
	});
});
</script>
<!--{template user/footer}-->